<template>
  <div>
    <el-carousel class="model1" :interval="5000" arrow="always" height="600px;">
      <el-carousel-item
        v-for="(item, index) in header"
        :key="index"
        class="sywz"
      >
        <img class="imdt" :src="item.url" />
        <p class="medium1">{{ item.name }}</p>
        <p class="medium2">{{ item.con }}</p>
      </el-carousel-item>
    </el-carousel>

    <div class="model3">
      <div class="photo">
        <p class="section-title">图文攻略</p>
      </div>
      <div class="bzjd">
        <div class="m3-left">
          <div class="m3-img">
            <img src="../assets/image/twgl1.png" alt="" />
          </div>
          <div class="m3-text-box">
            <p class="m3-title">中国大陆南极村</p>
            <p class="m3-content">
              位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南部位于广东省徐闻县西南
            </p>
            <el-button
              class="m3-more-btn"
              type="primary"
              size="default"
              @click=""
              >了解更多</el-button
            >
          </div>
        </div>
        <div class="m3-right">
          <div class="m3-item">
            <div class="m3-jdbox">
              <p>波罗的海</p>
              <p>徐闻必打卡景点榜</p>
            </div>
            <el-button
              class="m3-more-btn"
              type="primary"
              size="default"
              @click=""
              >了解更多</el-button
            >
          </div>
        </div>
      </div>
    </div>

    <!-- 标志景点 -->
    <div class="model2">
      <div class="photo">
        <p
          style="
            font-size: 42px;
            font-family: DFLiJinHeiW8-GB, DFLiJinHeiW8-GB-Regular;
            font-weight: 400;
            text-align: center;
            color: #279e70;
            line-height: 120px;
            margin: 0;
          "
        >
          标志景点
          <span style="position: relative; top: -85px; font-size: 25px">
            BIAOZHIJINGDIAN
          </span>
        </p>
      </div>
      <div class="bzjd">
        <div
          class="box1"
          v-for="(item, index) in attractlis.slice(0, 3)"
          :key="index"
          @click="jdxq(item)"
        >
          <div style="width: 100%; height: 60%">
            <img :src="item.headpic" style="width: 100%; height: 100%" />
          </div>
          <div style="width: 100%; height: 36%">
            <div>
              <p
                style="
                  font-size: 31px;
                  font-family: PingFang SC, PingFang SC-Semibold;
                  font-weight: 600;
                  color: #000000;
                  line-height: 32px;
                  margin-left: 20px;
                  margin-bottom: 0px;
                  margin-top: 10px;
                  overflow: hidden;
                  display: -webkit-box;
                  -webkit-line-clamp: 1;
                  -webkit-box-orient: vertical;
                  text-overflow: ellipsis;
                "
              >
                {{ item.name }}
              </p>
              <span
                style="
                  overflow: hidden;
                  display: -webkit-box;
                  -webkit-line-clamp: 3;
                  -webkit-box-orient: vertical;
                  text-overflow: ellipsis;
                  font-size: 14px;
                  font-family: PingFang SC, PingFang SC-Regular;
                  font-weight: 400;
                  text-align: left;
                  color: #333333;
                  line-height: 25px;
                  padding: 16px 10px 0px 20px;
                "
              >
                {{ item.note }}
              </span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 景点住宿 -->
    <div class="model5">
      <div style="display: flex; justify-content: center">
        <div class="photo" style="margin-top: 0">
          <p
            style="
              font-size: 42px;
              font-family: DFLiJinHeiW8-GB, DFLiJinHeiW8-GB-Regular;
              font-weight: 400;
              text-align: center;
              color: #279e70;
              line-height: 120px;
              margin: 0;
            "
          >
            景点住宿
            <span style="position: relative; top: -85px; font-size: 25px">
              JINGDIANZHUSU
            </span>
          </p>
        </div>
      </div>

      <div class="jdzs" v-for="(item, index) in holetlis" :key="index">
        <div class="imgStyle">
          <img :src="item.thumb" style="width: 100%; height: 100%" />
        </div>
        <div class="titleStyle">
          <div class="btwz">
            <div style="margin: 20px 0; display: inline-block">
              {{ item.title }}
            </div>
            <br />
            <div style="display: inline-block"></div>
            <!-- <div style="display: inline-block;float:right;margin-right:30px;margin-top:-30px;">￥298</div> -->
          </div>
          <div class="btwz1"></div>
          <div class="btwz2" style="height: 56px">
            <span>
              {{ item.note }}
            </span>
          </div>
          <div class="btwz2" style="color: #999999">
            <span> 电话：{{ item.contact }} </span>
          </div>
          <div class="btwz2" style="color: #999999">
            <span> 地址：{{ item.address }} </span>
          </div>
          <div style="position: relative; top: 14px; right: 31px">
            <el-button
              style="
                background: #009a7e;
                color: #fff;
                border-radius: 0;
                float: right;
              "
              @click="linkTo(item)"
              >查看详情</el-button
            >
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { service } from "@/request";
export default {
  data() {
    return {
      header: [],
      attractlis: [],
      stralis: [],
      videot: [{ url: "" }],
      holetlis: [],
    };
  },
  created() {},
  mounted() {
    this.Carousel();
    this.Attractlist();
    this.Strategylist();
    this.Videolist();
    this.Holete();
  },
  methods: {
    linkTo(item) {
      // console.log("item",item)
      window.open(item.href);
    },
    toDetail(item) {
      this.$router.push({
        path: "/lqxx",
        query: {
          id: item.id,
          origin: "strategy",
        },
      });
    },
    // 景点详情
    jdxq(item) {
      this.$router.push({
        path: "/jdxq",
        query: {
          id: item.id,
        },
      });
    },
    // 标志景点
    Attractlist() {
      service({
        url: "/go/attractlist",
        method: "post",
        data: { recommed: 1 },
      }).then((res) => {
        if (res.code == 200) {
          // console.log("res",res.data)
          this.attractlis = res.data;
        }
      });
    },
    // 轮播图
    Carousel() {
      service({
        url: "/go/carousel",
        method: "post",
        data: {},
      }).then((res) => {
        if (res.code === 200) {
          // console.log("header",res.data)
          this.header = res.data;
        }
      });
    },

    // 攻略
    Strategylist() {
      service({
        url: "/go/strategylist",
        method: "post",
        data: {},
      }).then((data) => {
        if (data.code == 200) {
          this.stralis = data.data;
        }
      });
    },

    // 视频
    Videolist() {
      service({
        url: "/go/attractvedio",
        method: "post",
        data: {},
      }).then((res) => {
        if (res.code == 200) {
          this.videot = res.data;
        }
      });
    },

    // 酒店
    Holete() {
      service({
        url: "/go/hotlelist",
        method: "post",
        data: {},
      }).then((res) => {
        if (res.code == 200) {
          this.holetlis = res.data;
        }
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.model1 {
  width: 99.9%;
  height: 600px;
  background: url("../assets/image/dpm1.png") no-repeat;
  background-size: 100% 100%;
}
.sywz {
  font-size: 49px;
  font-family: PingFang SC, PingFang SC-Semibold;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  margin-top: 0;
}
.model2 {
  width: 99.9%;
  height: 600px;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  background: url("../assets/image/bjt1.png") no-repeat;
  background-size: 100% 100%;
  flex-direction: column;
}
.photo {
  width: 333px;
  text-align: center;
  background-size: 100% 100%;
  display: flex;
  justify-content: center;
}
.bzjd {
  width: 70%;
  height: 80%;
  display: flex;
  justify-content: space-between;

  .m3-left {
    width: 60%;
    background: #191b2a;
    display: flex;
    padding: 30px;
    .m3-img {
      width: 45%;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .m3-text-box {
      flex: 1;
      min-width: 0;
      padding: 0 20px 0 40px;

      .m3-title {
        font-size: 20px;
        color: #ffffff;
      }
      .m3-content {
        color: #fff;
        font-size: 14px;
        line-height: 26px;
        letter-spacing: 2px;
      }
      .m3-more-btn {
        width: 100%;
        background: #cd2e4a;
        border: none;
        border-radius: 0;
      }
    }
  }

  .m3-right {
    margin-left: 30px;
    flex: 1;
    min-width: 0;
    background: #191b2a;
    padding: 30px;

    .m3-item {
      background: url("../assets/image/m32.png") no-repeat;
      background-size: 100% 100%;
    }
  }
}
.box1 {
  width: 30%;
  height: 100%;
  display: inline-block;
  background: #fff;
}
.model3 {
  width: 100%;
  height: 1100px;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  flex-direction: column;
  background: url("../assets/image/l1.jpg") no-repeat;
  background-size: 100% 100%;
}
.model4 {
  width: 99.9%;
  height: 600px;
  flex-direction: column;
}
.model5 {
  width: 99.9%;
  height: 600px;
  display: inline-table;
  justify-content: center;
  align-content: center;
  align-items: center;
  background: url("../assets/image/bjt1.png") no-repeat;
  background-size: 100% 100%;
  flex-direction: column;
}
.jdzs {
  margin: 15px auto;
  width: 70%;
  height: 300px;
}
.imgStyle {
  width: 30%;
  height: 100%;
  display: inline-block;
  float: left;
  /* background: url("../assets/image/jd.png") no-repeat; */
  /* background-size: 100% 100%; */
}
.titleStyle {
  width: 69.5%;
  height: 100%;
  display: inline-block;
  background: #fff;
}
.ship {
  width: 50%;
  height: 100%;
  display: inline-block;
  /* background: url("../assets/image/pinmu.png") no-repeat; */
  /* background-size: 100% 100%; */
}
.shipA {
  width: 50%;
  height: 100%;
  display: inline-block;
}
.shpB {
  width: 50%;
  height: 50%;
  display: inline-block;
}
.btwz {
  font-size: 31px;
  font-family: Source Han Sans SC, Source Han Sans SC-Regular;
  font-weight: 400;
  text-align: left;
  color: #000000;
  line-height: 28px;
  margin-left: 25px;
}
.btwz2 {
  font-size: 14px;
  font-family: Source Han Sans SC, Source Han Sans SC-Regular;
  font-weight: 400;
  text-align: left;
  color: #000000;
  line-height: 28px;
  margin-left: 25px;
  padding-right: 15px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}

.imdt {
  max-width: 100%;
  height: auto;
}
.medium {
  position: absolute;
  left: 5rem;
  bottom: 10rem;
  font-size: 50px;
  color: white;
  /* text-decoration-line: underline; */
  font-weight: 900;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 48px;
  line-height: 100%;
  display: flex;
  align-items: center;
  flex: none;
  order: 1;
  align-self: stretch;
}
.nameSty {
  position: absolute;
  left: 5rem;
  bottom: 10rem;
  font-size: 50px;
  color: white;
  /* text-decoration-line: underline; */
  font-weight: 900;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 48px;
  line-height: 100%;
  display: flex;
  align-items: center;
  flex: none;
  order: 1;
  align-self: stretch;
}
/deep/ .el-carousel__container {
  position: relative;
  height: 600px;
}
.imdt {
  width: 100%;
  height: 100%;
}
.medium2 {
  position: absolute;
  left: 5rem;
  bottom: 10rem;
  font-size: 50px;
  color: white;
  /* text-decoration-line: underline; */
  font-weight: 900;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 48px;
  line-height: 100%;
  display: flex;
  align-items: center;
  flex: none;
  order: 1;
  align-self: stretch;
}
.medium1 {
  position: absolute;
  left: 5rem;
  bottom: 15rem;
  font-size: 50px;
  color: white;
  /* text-decoration-line: underline; */
  font-weight: 900;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 48px;
  line-height: 100%;
  display: flex;
  align-items: center;
  flex: none;
  order: 1;
  align-self: stretch;
}

.section-title {
  font-size: 42px;
  font-family: DFLiJinHeiW8-GB, DFLiJinHeiW8-GB-Regular;
  font-weight: 400;
  text-align: center;
  color: #fff;
  line-height: 100px;
  margin: 0;
}
</style>
